<h1>Formulaire d'enregistrement</h1>
<?php if(isset($this->error)):?>
	<div>
	<div style="color:red">Votre saisie comporte des erreurs : </div>
	<?php foreach ($this->error as $itemerror):?>
	<div style="margin-left:10px;color: red;"><?php echo $this->escape($itemerror);?></div>
	<?php endforeach;?>
	</div>
<?php endif;?>
<form id="registration" method="post" action="<?php echo $this->url(array('controller'=>'auth','action'=>'registered'));?>">
	<fieldset>
		<div class="label">Salutation</div>
		<div>
		<input type="radio" name="salutation[]" id="salutation" value="M" <?php if ($this->formdata['salutation']=='M') echo "CHECKED";?>/>Mr
		<input type="radio" name="salutation[]" id="salutation" value="Mlle" <?php if ($this->formdata['salutation']=='Mlle') echo "CHECKED";?>/>Miss
		<input type="radio" name="salutation[]" id="salutation" value="Mme" <?php if ($this->formdata['salutation']=='Mme') echo "CHECKED"; ?> validate="required:true"/>Mme
		</div>
		<div></div>
	</fieldset>
	<fieldset>
	<div class="label">Firstname</div>
	<div><?php echo $this->formText("firstname",$this->formdata['firstname']);?></div>
	<div></div>
	</fieldset>
	<fieldset>
	<div class="label">lastname</div>
	<div><?php echo $this->formText("lastname",$this->formdata['firstname']);?></div>
	<div></div>
	</fieldset>
	<fieldset>
	<div class="label">email</div>
	<div><?php echo $this->formText("email",$this->formdata['email']);?></div>
	<div></div>
	</fieldset>
	<fieldset>
	<div class="label">password</div>
	<div><?php echo $this->formPassword("password");?></div>
	<div></div>
	</fieldset>
	<fieldset>
	<div class="label">Confirmed</div>
	<div><?php echo $this->formPassword("confirmedpwd");?></div>
	<div></div>
	</fieldset>
	<fieldset>
	<div class="label">Zipcode</div>
	<div><?php echo $this->formText("zipcode",$this->formdata['zipcode']);?></div>
	<div></div>
	</fieldset>
	<fieldset>
		<div class="label">city</div>
		<div><?php echo $this->formText("city",$this->formdata['city']);?></div>
		<div></div>
	</fieldset>
	<?php if($this->type==4):?>
	<fieldset>
		<div class="label">Echelle de r&#233;mun&#233;ration </div>
		<div><?php echo $this->formSelect('payment',$this->formdata['payment'],array("validate"=>"required:true;"),$this->payment);?></div>
		<div></div>
	</fieldset>
	<fieldset>
		<div class="label">Comp&#233;tences : </div>
		<div><?php echo $this->formSelect('expertises',$this->formdata['expertises'],array("multiple"=>"multiple","validate"=>"required:true"),$this->metier);?></div>
		<div></div>
	</fieldset>
	<?php endif;?>
	<fieldset>
	<?php echo $this->formHidden("type",$this->type);?>
	<?php echo $this->formSubmit("Register","Register");?>
	
	</fieldset>
</form>
<?php //echo $this->headScript()->appendFile('/js/ui.ddlstacker.js','text/javascript');?>
<?php echo $this->headLink()->appendStylesheet('/styles/register.css');?>
<?php echo $this->headScript()->appendFile('/js/jquery.validate.min.js','text/javascript');?>
<?php echo $this->headScript()->appendFile('/js/register.js','text/javascript');?>
